<?php namespace App\Admin\Cabinet\CabinetCell;

use App\Core\Model as BaseModel;

class Model extends BaseModel {

    protected $table = 'cabinet_cell';
    protected $primaryKey = 'id';
    
    //cabinet对应关系
    public function cabinet(){
        return $this->belongsTo('App\Admin\Cabinet\Cabinet\Model', 'cabinet_id', 'id');
    }
    //goods对应关系
    public function goods(){
        return $this->belongsTo('App\Admin\Goods\Goods\Model', 'goods_id', 'id');
    }
    //price对应关系
    public function price(){
        return $this->belongsTo('App\Admin\Finance\Price\Model', 'price_id', 'id');
    }
}